home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / orsimple.tip < prev    next >
Text File  |  1993-09-15  |  3KB  |  105 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 34.4.1, p. IV-62.
  16. % Original source in file "o1.TEX", starting line 249.
  17. \wlog{L: "orsimple.tip" ["o1.TEX," l. 249, p. IV-62]}%
  18. % This file DOES NOT belong to format "texip."
  19. \InputD{box-mac.tip}
  20. \InputD{pmtime.tip}
  21. \InputD{graphmac.tip}
  22. \newdimen\LeftPageShift     \LeftPageShift = -10pt
  23. \newdimen\RightPageShift    \RightPageShift= -40pt
  24. \def\HeadLine{%
  25.     \ifodd\PageNo
  26.         \HboxR to \hsize{%
  27.             \strut
  28.             \the\month/\the\day/\the\year, \PrintMilTime
  29.             \hfil
  30.             {\tt\jobname.tip}% 
  31.         }%
  32.     \else
  33.         \HboxR to \hsize{%
  34.             \strut
  35.             {\tt\jobname.tip}% 
  36.             \hfil
  37.             \the\month/\the\day/\the\year, \PrintMilTime
  38.         }%
  39.     \fi
  40. }
  41. \countdef\ChapNo = 0
  42. \countdef\PageNo = 1
  43. \def\FootLine{%
  44.     \ifodd\PageNo
  45.         \HboxR to \hsize{%
  46.             \strut
  47.             \hfil
  48.             \bf \the\ChapNo--\the\PageNo
  49.         }% 
  50.     \else
  51.         \HboxR to \hsize{%
  52.             \strut
  53.             \bf
  54.             \the\ChapNo--\the\PageNo
  55.             \hfil
  56.         }% 
  57.     \fi
  58. }
  59. \newbox\CropMarksBox
  60. \setbox\CropMarksBox = \vbox{%
  61.     \offinterlineskip
  62.     \SetScale{1in}
  63.     \SetLineThickness{0.5pt}
  64.     \DrawHLine(-0.8,0){0.2}
  65.     \DrawVLine(-0.7,-0.1){0.2}
  66.     \DrawHLine(3.4,0){0.2}
  67.     \DrawVLine(3.5,-0.1){0.2}
  68.     \DrawHLine(-0.8,-6.5){0.2}
  69.     \DrawVLine(-0.7,-6.6){0.2}
  70.     \DrawHLine(3.4,-6.5){0.2}
  71.     \DrawVLine(3.5,-6.6){0.2}
  72. }
  73. \ZeroBox{\CropMarksBox}
  74. \def\SimpleOutputRoutine{%
  75.     \ifodd\PageNo
  76.         \dimen0 = \RightPageShift
  77.     \else
  78.         \dimen0 = \LeftPageShift
  79.     \fi
  80.     \shipout\vbox{%
  81.         \offinterlineskip
  82.         \copy\CropMarksBox
  83.         \moveright\dimen0 \vbox{%
  84.             \HeadLine
  85.             \vskip 12pt
  86.             \VboxR to \vsize{%
  87.                 \unvbox 255
  88.             }
  89.             \vskip 12pt
  90.             \FootLine
  91.         }
  92.     }
  93.     \global\advance\PageNo by 1
  94. }
  95. \def\OutputWithRules{%
  96.     \output = {\SimpleOutputRoutine}%
  97. }
  98. \def\OutputWithoutRules{
  99.     \output = {%
  100.         \EliminateRuledBoxes
  101.         \SimpleOutputRoutine
  102.     }
  103. }
  104. \OutputWithoutRules
  105.